package me.jiatao.lifecycle

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import me.jiatao.lifecycle.type1.BasePresenter
import me.jiatao.lifecycle.type2.DefaultPresenter

class MainActivity : AppCompatActivity() {
    private val basePresenter = BasePresenter()
    private val defaultPresenter = DefaultPresenter()

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)

        lifecycle.addObserver(basePresenter)
        lifecycle.addObserver(defaultPresenter)

    }
}